//
//  BBMyReleaseJobViewController.m
//  BearSiX
//
//  Created by BearBaby on 16/3/29.
//  Copyright © 2016年 Tom. All rights reserved.
//

#import "BBMyReleaseJobViewController.h"
#import "BBSixHeader.h"
#import "BBMyReleaseJobCell.h"
@interface BBMyReleaseJobViewController ()<UITableViewDelegate,UITableViewDataSource>
@property(nonatomic,strong)UITableView* tableView;
@end

@implementation BBMyReleaseJobViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"我发布的任务";
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(add)];
    self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, WINSIZEWIDTH, WINSIZEHEIGHT) style:UITableViewStyleGrouped];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.view addSubview:self.tableView];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 4;

}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;

}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString* identifire = @"Cell";
    BBMyReleaseJobCell* cell = [self.tableView dequeueReusableCellWithIdentifier:identifire];
    if (!cell) {
        cell = [[BBMyReleaseJobCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifire];
        cell.delegate = self;
    }
    return cell;
}

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 0.0000001;

}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return 15;

}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    CGFloat cellHeight = 0.0f;
    BBMyReleaseJobCell* cell = (BBMyReleaseJobCell*)[self tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath];
    
    cellHeight = cell.finalH;
    return cellHeight;
}
//添加
-(void)add{


}
@end
